package cheme.ProcessEditor.Parts.Equations;

import org.eclipse.draw2d.Label;
import org.eclipse.gef.EditPolicy;

import cheme.ProcessEditor.Figures.FieldFig;
import cheme.ProcessEditor.Parts.AbstractTextModelPart;

public class PartEquationField extends AbstractTextModelPart
{
	@Override
	protected FieldFig createFigure()
	{
		FieldFig fig = super.createFigure();
		fig.setToolTip(new Label("One part of an equation.\n(Double click or press space-bar to edit)"));
		return fig;
	}
	
	protected void createEditPolicies()
	{
		installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new PolicyEquationFieldDirectEdit());
		installEditPolicy(EditPolicy.COMPONENT_ROLE, new ccc_PolicyEquationField());
		installEditPolicy(EditPolicy.LAYOUT_ROLE, null);
	}
}
